#include <bits/stdc++.h>
using namespace std;
#define N 100005
int n, r[N], vis[N], ans;
int main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%d", &r[i]);
    }
    sort(r+1, r+n+1);
    int i = 1, j = 2;
    while (i < n && j <= n) {
        while (r[i] >= r[j] && j < n) j++;
        if (r[i] >= r[j]) break;
        ans++;
        i++;
        j++;
    }
    ans = n-ans;
    printf("%d", ans);
    return 0;
}